﻿using System;
using System.Collections.Generic;

using System.Text;
using AMG.DALProfile;
using System.Data;
using System.Data.SqlClient;

namespace AMG.DALSQLServer
{
    public class AMG_Common
    {
        public static string CheckInformaction(int userid)
        {
            string str="未完整";
            AMG.DALSQLServer.AMG_UserInfo us=new AMG.DALSQLServer.AMG_UserInfo();
            AMG.Model.AMG_UserInfo usinfo=us.GetModel (userid);
            if (usinfo.UserName==null||usinfo.UserName =="")
            {
                return  str;
            }
            
            if (usinfo.Company ==null||usinfo .Company =="")
            {
                return str;
            }
            if (usinfo.Positison ==null||usinfo .Positison =="")
            {
                return str;
            }
            if (usinfo.CRNo ==null||usinfo .CRNo =="")
            {
                return str;
            }
            if (usinfo.Phone ==null||usinfo .Phone =="")
            {
                return str;
            }
            if (usinfo.Address ==null||usinfo .Address =="")
            {
                return str;
            }
            if (usinfo.Mail ==null||usinfo .Mail =="")
            {
                return str;
            }

            if (usinfo.RoundNo == null && usinfo.RoundNo == 0)
            {
                return str;
            }
            return "完整";
        }


        public static string CheckInformaction1(int userid)
        {
            string str = "<td class=\"fixedHeaderCol2\">未完整</td>";
            AMG.DALSQLServer.AMG_UserInfo us = new AMG.DALSQLServer.AMG_UserInfo();
            AMG.Model.AMG_UserInfo usinfo = us.GetModel(userid);
            if (usinfo.UserName == null || usinfo.UserName == "")
            {
                return str;
            }
            
            if (usinfo.Company == null || usinfo.Company == "")
            {
                return str;
            }
            if (usinfo.Positison == null || usinfo.Positison == "")
            {
                return str;
            }
            if (usinfo.CRNo == null || usinfo.CRNo == "")
            {
                return str;
            }
            if (usinfo.Phone == null || usinfo.Phone == "")
            {
                return str;
            }
            if (usinfo.Address == null || usinfo.Address == "")
            {
                return str;
            }
            if (usinfo.Mail == null || usinfo.Mail == "")
            {
                return str;
            }

            if (usinfo.RoundNo == null && usinfo.RoundNo == 0)
            {
                return str;
            }
            return "<td class=\"fixedHeaderCol1\">完整</td>";
        }
    }
}
